package bdhub.littletail.app.message;

public class Head implements Cloneable {
	private String mid;
	private String fromId;
	private String toId;
	/** 
	 * 消息类型（单聊、群聊） 
	 */
	private int type;
	private long time;
	private String comments;
	/**
	 * 内容类型（文本、图片等等）
	 */
	private int textType;

	public String getMid() {
		return mid;
	}

	public void setMid(String mid) {
		this.mid = mid;
	}

	public String getFromId() {
		return fromId;
	}

	public void setFromId(String fromId) {
		this.fromId = fromId;
	}

	public String getToId() {
		return toId;
	}

	public void setToId(String toId) {
		this.toId = toId;
	}


	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}


	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public int getTextType() {
		return textType;
	}

	public void setTextType(int textType) {
		this.textType = textType;
	}

	@Override
	public String toString() {
		StringBuilder buf = new StringBuilder();
		buf.append("mid:").append(mid).append(",")
		    .append("fromId:").append(fromId).append(",")
		    .append("toId:").append(toId).append(",")
		    .append("type:").append(type).append(",")
			.append("time:").append(time).append(",")
			.append("comments:").append(comments).append(",")
			.append("textType:").append(textType);
		return buf.toString();
	}

	@Override
	public Head clone() {
		try {
			return (Head) super.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return null;
	}

}
